<?php e($javascript->codeBlock('$(document).ready(function() {$("#PageEditForm").ajaxForm(function() {$(".content").load("/admin/posts");});});'));?>
<?php e($this->renderElement('tinymce'));?>

<div id="page">
	<?php e($form->create('Page'));?>
		<fieldset id="page-edit">
			<legend>Edit page</legend>
		<?php e($form->input('id'));?>
		<?php e($form->input('title'));?>
		<?php e($form->input('copyright_id', array('options' => $copyright_type)));?>
		<?php e($form->input('body'));?>
		<?php e($form->input('url'));?>
		<?php if($othAuth->group('name') == "Site Admins") {
				e($form->input('published', array('label'=>'Publish Story?')));
			} else {
				e($form->input('published', array('type'=>'hidden', 'value'=>0)));
			}
		?>
		<?php e($form->input('user_id', array('type'=>'hidden')));?>
		</fieldset>
		
		<?php e($form->submit('Submit Page', array('class'=>'add')));?> <?php e($html->link('Cancel', '/admin/pages', array('class'=>'cancel')));?>
	<?php e($form->end());?>
</div>